<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$data.title}_{$Config.sitename}</title>
	<meta name="keywords" content="烘培资讯,烘焙入门,专业烘焙网"/>
	<meta name="description" content="烘焙圈为爱好者提供最新、最好的烘焙资讯，新手可以学习到更多烘焙技巧、烘焙原料知识、烘焙工具用法等。"/>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/news.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
</head>

<body>
<style type="text/css">
<!--
.n-tl{border-bottom:#f5f5f5 solid 1px;}
.n-ay .nc-ul .n-cat-ac{ height:55px;}
.n-dy-lisd {position: fixed;_position: absolute;top: 0;z-index: 250; right:0; margin-top:10px;}
-->
</style>
<div class="b-page">
	<include file="Public:header" />
	<!--newsand-->
   	<div class="n-rd">
		<div class="n-rd-dv n-dv">
			<div class="n-left nr-lt">
				<div class="n-tl n-mx" style="padding-bottom:10px;"><a href="/news/">烘焙资讯</a> &gt; <a href="/news/category/id/{$class.id}">{$class.name}</a> &gt;  
				{$data.title}</div>
				<div class="n-rd-nw">
					<div class="n-title">{$data.title}</div>
					<div class="n-ftitle">来自：{$class.name}&nbsp;&nbsp;&nbsp;&nbsp;作者：烘焙圈 &nbsp;&nbsp;&nbsp;&nbsp;{$data.create_time|date='Y-m-d H:i',###}&nbsp;&nbsp;&nbsp;&nbsp;{$data.clicknum}次阅读</div>
					<div class="n-ct">{$data.content}</div>
					<if condition="$PageCount gt 1 ">
					<div class="pager"> 
						<if condition="$npage gt 1"> 
							<a rel="nofollow" href="?npage={$npage-1}">上页</a>&nbsp;
						</if>
						<for start="1" end="$PageCount" comparison="elt">
							<if condition="$i eq $npage">
							<span class="current">{$i}</span>  
							<else/>
							<a rel="nofollow" href="?npage={$i}">&nbsp;{$i}</a>&nbsp;
							</if>
						</for>
						<if condition="$npage lt $PageCount"> 
							<a rel="nofollow" href="?npage={$npage+1}">下页</a>&nbsp;
						</if>
						
				   </div>
				   </if>	
				</div>
				<div class="g-bbs">
					<h2 class="g-bbs-ti">{$data.title}的评论({$count}个)</h2>
					<div class="b-zyn">
					  <if condition="$userid neq ''">
						<a href="__WEBURL__/u/{$userinfo.openuid}" class="b-zyn__pic">
							<img class="l-full" src="{$userinfo.uavatar|getUavatar}" alt="">
						</a>
					   <else/>
						<a href="javascript:void(0);" class="b-zyn__pic">
							<img class="l-full" src="/static/home/images/default_touxiang.jpg" alt="">
						</a>
					   </if>					   
					   	<form onSubmit="return false">
							<textarea name="content" id="content" cols="30" required="" data-len="10" rows="10" class="b-texte"></textarea>
							<input type="hidden" id="infoid" value="{$data.id}">
                        	<input type="hidden" id="msgType" value="5">
							<button class="b-btn" id="sendMsg_btn">评论</button>
						</form>
	
					</div>
					
					<div class="g-bbs-div">
						<volist name="msglist" id="value">
						<div class="b-item" id="send_{$value.id}">
							<div class="n-left b-itm-lt">
								<a href="/u/{$value.openuid}" class="yf-huiying__pic">
									<img src="{$value.uavatar|getUavatar}" class="uavatar_50">								
								</a>
								<span>{$value.nickname}</span>
							</div>
							<div class="n-left b-itm-re">
								<p class="b-itm-con">{$value.content}<br>
									<small>{$value.create_time|format_time}</small>
									<small class="b-itm-right">
										<if condition="$value.userid eq $userid">
											<span style="color:#ff7b00;">我的留言</span>-<a href="javascript:;" class="b-send msgDel_btn" data-info="msgid,{$value.id}" data-url="do/delmsg/" >删 除</a>
										<else/>
											<a href="javascript:;" class="b-send openReply_btn"  data-infoid="{$data.id}" data-touid="{$value.userid}"    data-parent="{$value.id}"  data-user="{$value.nickname}" >回 复</a>
										</if>							
									</small>				
								</p>
								<if condition="$value.sou neq ''">
									<div class="yf-child">
									  <volist name="value.sou" id="one">
										<div class="g-list" id="send_{$one.id}">
											<if condition="$one.museid eq 0">
												<div class="g-list-lt">
													<img src="/f/user/15/05/28/185_200x200.jpg" style="width:30px;">								
												</div>
											<else/>
												<div class="g-list-lt">
													<a href="/u/{$one.openuid}">
														<img src="{$one.uavatar|getUavatar}" style="width:30px;">								
													</a>
												</div>
											</if>
											
											<div class="g-list-rt">
												<p class="b-itm-con"><span class="b-mem">@{$one['nickname']==''?'烘焙圈官方':$one['nickname']}：</span>{$one.content}<br>
													<small>{$one.create_time|format_time}</small>
													<small class="b-itm-right">
														<if condition="$one.userid eq $userid">
															<if condition="$one.museid eq 0">
																<a href="javascript:;" class="b-send openReply_btn"  data-infoid="{$data.id}" data-touid="0"    data-parent="{$value.id}"  data-user="烘焙圈官方" >回 复</a>
															<else/>
																<span style="color:#ff7b00;">我的留言</span>-<a href="javascript:;" class="b-send msgDel_btn" data-info="msgid,{$one.id}" data-url="do/delmsg/" >删 除</a>
															</if>
															
															
														<else/>
															<if condition="$one.museid eq 0">
																<a href="javascript:;" class="b-send openReply_btn"  data-infoid="{$data.id}" data-touid="0"    data-parent="{$value.id}"  data-user="烘焙圈官方" >回 复</a>
															<else/>
																<a href="javascript:;" class="b-send openReply_btn"  data-infoid="{$data.id}" data-touid="{$one.userid}"    data-parent="{$value.id}"  data-user="{$one.uname}" >回 复</a>
															</if>
														
															
														</if>
																											
													</small>				
												</p>
											</div>
											<div class="clear"></div>
										</div>
									   </volist>										
									</div>
								</if>
								
							</div>
							<div class="clear"></div>
						</div>
						</volist>
						
						
						
					</div>
					
					<div class="pager">{$page}</div>
					
				</div>
			</div>
			<div class="nc-sj-rt">

				<div class="sj-rt-top"><a href="{$advertes.linkurl}"><img src="{$advertes.image}"></a></div>
				
				<div class="rt-hot">
					<div class="n-tl">本文来自</div>
					
					<ul class="hot-ul">
						<li class="hot-ul-li">
							<div class="hot-img"><img src="{$class.image}"></div>
							<div class="hot-text">
								<h3><a href="/news/category/id/{$class.id}">{$class.title}</a></h3>
								<p>{$class.summary|str_cut=20}...</p>
							</div>
						</li>
					</ul>
				</div>
				
				<div class="rt-hot">
					<ul class="hot-ul">
					    <if condition="($lastNews neq '')">
						<li style=" color:#323232">
							上一篇：
						</li>
						<li style="padding:8px 0"><a href="/news/{$lastNews.id}.html"><nobr>{$lastNews.title}</nobr></a></li>
						</if>
						
						<if condition="($nextNews neq '')">
						<li style="color:#323232">
							下一篇：
						</li>
						<li style="padding:8px 0"><a href="/news/{$nextNews.id}.html"><nobr>{$nextNews.title}</nobr></a></li>
						</if>
					</ul>
				</div>
				
				<if condition="($news neq '')">
				<div class="rt-hot">
					<div class="n-tl">热门主题站</div>
					
					<ul class="hot-ul">
					
						<volist name="news" id="vo">
							<li class="n-nesws"><a href="/news/{$vo.id}.html"><nobr>{$vo.title}</nobr></a></li>
						</volist>
					</ul>
				</div>
				</if>
				<if condition="($works neq '')">
				<div class="n-ay" id="float" >
					<div class="n-tl">烘焙圈作品</div>
					<ul class="nc-ul">
						<volist name="works" id="vlaue">
							<li class="n-cat-ac">
								<a href="/works/{$vlaue.workid}">
								<div class="n-left rd-li-ig"><img src="{$vlaue.image}"></div>
								<div class="n-left rd-li-dv">
									<p>{$vlaue.title|str_cut=15}</p>
									<p><span>{$vlaue.clicknum}次阅读</span> &nbsp;&nbsp;&nbsp;<span>{$vlaue.goodnum}个赞</span></p>
								</div>
								</a>
							</li>
						</volist>
						
					</ul>
				
				</div>
				</if>
				
			</div>
			<div class="clear"></div>
		</div>
	
	</div>
	<!--andnews-->
    <include file="Public:footer" />
</div>
<script src="/static/home/js/index.js"></script>
<script src="/static/home/js/jquery.common.js?v=20150101"></script>
<script src="/static/home/js/jquery.doajax.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	 //留言回复按钮
    $(".openReply_btn").on('click',function(e){
        e.preventDefault();
        if ($(this).hasClass('cancel-reply')) {
            $(this).removeClass('cancel-reply').html("回复");
            $(".b-list-reply").remove();
        }else{
            var infoid = $(this).attr('data-infoid'),
				touid = $(this).attr('data-touid'),
                parent = $(this).attr('data-parent'),
				user = $(this).attr('data-user');
                reply=$(".list-reply");
            if(reply.length>0){
                $(".b-huiying__btn").removeClass('cancel-reply').html("回复");
                reply.remove();
            }
			 $(".openReply_btn").removeClass('cancel-reply').html("回复");
            $(this).addClass('cancel-reply').html("取消");
            var str="<div class='b-list-reply'><input type='hidden' id='infoid' value='"+infoid+"'><input type='hidden' id='touserid' value='"+touid+"'><input type='hidden' id='msgType' value='5'><input type='hidden' id='parent_id' value='"+ parent+"'><textarea id='rcontent' name='contentes' class='b-textes' required='' data-len='3' rows='2' placeholder='@"+user+"'></textarea><button class='b-btn M_Reply_btn' style='margin-top:5px'>回 复</button></div>";
			$(".b-list-reply").remove();
            $(this).parent().parent().append(str);
        };
    });
});
</script>
<script type="text/javascript" >
//侧栏跟随
(function(){
   var oDiv=document.getElementById("float");
   var H=0,iE6;
   var Y=oDiv;
   var xl = $('#float').offset().left; 
   while(Y){H+=Y.offsetTop;Y=Y.offsetParent};
   iE6=window.ActiveXObject&&!window.XMLHttpRequest;
   if(!iE6){
       window.onscroll=function()
       {
           var s=document.body.scrollTop||document.documentElement.scrollTop;
           if(s>H){oDiv.className="n-ay n-dy-lisd"; oDiv.style.left=xl+"px";if(iE6){oDiv.style.top=(s-H)+"px";}}
           else{oDiv.className="n-ay";}    
       };
   }
})();
</script>

</body>
</html>